<!DOCTYPE html>
<html lang="zh" xmlns="http://java.sun.com/jsf/html">
<head>
    <meta charset="UTF-8">
    <title>流程管理</title>
    <link rel="stylesheet" href="<@s.url '/statics/js/layui/css/layui.css'/>"/>
    <link rel="stylesheet" href="<@s.url '/statics/css/common.css'/>"/>
    <script type="text/javascript" src="<@s.url '/statics/js/jquery-3.2.1.js'/>"></script>
    <script type="text/javascript" src="<@s.url '/statics/js/layui/layui.js'/>" ></script>
    <script type="text/javascript" src="<@s.url '/resources/process/js/task.js'/>"></script>
</head>
<body>
    <button class="layui-btn layui-btn-normal" onclick="javascript:location.reload();" title="刷新"><i class="layui-icon">&#x1002;</i>刷新</button>
<br>
<table class="layui-table">
    <thead>
    <tr>
        <th>ProcessDefinitionId</th>
        <th>ProcessInstanceId</th>
        <th>TaskId</th>
        <th>name</th>
        <th>description</th>
        <th>owner</th>
        <th>assignee</th>
        <th>DelegationState</th>
        <th>dueDate</th>
        <th>状态</th>
        <th width="10px">操作</th>
    </tr>
    </thead>
    <tbody>
    <#list taskList as t>
    <tr>
        <td>${t.processDefinitionId!}</td>
        <td>${t.processInstanceId!}</td>
        <td>${t.id!}</td>
        <td>${t.name!}</td>
        <td>${t.description!}</td>
        <td>${t.owner!}</td>
        <td>${t.assignee!}</td>
        <td>${t.delegationState!}</td>
        <td>${t.dueDate!}</td>
        <td>${t.suspended?string("挂起","激活")}</td>
        <td>
            <div class="layui-btn-group">
                <button class="layui-btn layui-btn-mini" onclick="completeTask('${t.id}')">完成</button>
                <button class="layui-btn layui-btn-mini  layui-btn-danger" onclick="del('${t.id}')">删除</button>
            </div>
        </td>
    </tr>
    </#list>
    </tbody>
</table>
</body>
</html>